import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { SystemController } from './system.controller'
import { User, UserSchema } from './schema/user.schema'
import { Role, RoleSchema } from './schema/role.schema'
import { Rule, RuleSchema } from './schema/rule.schema'
import { SystemService } from './servie/system.service'
import { JwtService } from '@nestjs/jwt'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Role.name, schema: RoleSchema, collection: 'role' },
      { name: Rule.name, schema: RuleSchema, collection: 'rule' },
      { name: User.name, schema: UserSchema, collection: 'user' },
    ]),
  ],
  controllers: [SystemController],
  providers: [SystemService, JwtService],
})
export class SystemModule {
}
